home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re trouble with data linking < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Re: trouble with data linking
  2. Sent:        9/10/96 9:56 AM
  3. Received:    9/10/96 9:56 AM
  4. From:        Mary Boetcher <boetche1@apple.com>
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. >I'm having trouble getting linking to work. I'm trying to make a
  10. >part displays one month of a calendar. I would like to link it with
  11. >another instance of the same part so that when the user changes the
  12. >month or year of the first, the second automatically updates to the
  13. >month after the first. The calendar itself has no selectable content
  14. >but I create a selection object that references the part content for
  15. >enabling the Copy menu item and for the source link. After I put two
  16. >instances of the calendar in ODF Table or ODF Draw, I copy the first,
  17. >activate the second and "Paste As…" with automatic linking and merge
  18. >into contents selected. The second gets updated correctly at this
  19. >point. But any changes made after this to the first are not propagated
  20. >to the second (i.e. DoUpdateLink is not called). I am calling the
  21. >presentation's ContentUpdated method when the data in the first is
  22. >changed.
  23.  
  24. It's unclear to me which part is managing the linking. Does your calendar part subclass FW_CLinkManager, FW_CLinkSource, and FW_CLinkDestination? If not, you're relying on the linking support in the container part (ODFDraw or ODFTable). The linking code in the container part will paste the entire calendar part every time the link is updated. In other words, the 2nd calendar part is created by the container's linking code, not you. It's a "live copy" of the 1st calendar part.
  25.  
  26. My second question is, which part is handling the Paste As command? If it's the calendar part, and it doesn't provide its own linking support, then you're not actually creating a link but doing a simple paste.
  27.  
  28. Mary Boetcher
  29. ODF Person